var linkChooserDialog = {

    selectedValue : null,

    init : function () {
        // Here goes your code for setting your custom things onLoad.
        // ensure window title in inlinepopups
        var inlinepopups = false;
        for (obj in tinyMCE.selectedInstance.plugins)
            if (tinyMCE.selectedInstance.plugins[obj] == "inlinepopups")
                inlinepopups = true;

        if (inlinepopups)
            tinyMCE.setWindowTitle(window, document.getElementsByTagName("title")[0].innerHTML);
    },
    
    submit : function () {
        tinyMCEPopup.execCommand("mceBeginUndoLevel");

        var callback = tinyMCEPopup.getWindowArg("callback");
        callback.call(this, this.selectedValue);
        
        tinyMCEPopup.execCommand("mceEndUndoLevel");
        // close popup window
        tinyMCEPopup.close();
    },

    cancel : function() {
        tinyMCEPopup.close();
    },

    select : function(path){
        this.selectedValue = path;
    },

    unselect : function(path){
        this.selectedValue = null;
    }
};
		